package com.swak.boot.config.job;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.google.common.eventbus.EventBus;
import com.swak.job.queue.QueueService;
import com.swak.job.queue.guava.GuavaQueueService;

/**
 * 基于消息队列
 * 
 * @author DELL
 */
@Configuration
@ConditionalOnClass({ EventBus.class })
@ConditionalOnMissingBean(QueueService.class)
public class GuavaQueueAutoConfiguration {

	@Bean
	public GuavaQueueService GuavaQueueService() {
		return new GuavaQueueService();
	}
}
